The Options dialog enables you to customize many WinMerge features. To set WinMerge options:
Click
→ in the menu or the button in the toolbar.The Options dialog contains a number of pages, each containing a group of related options. You can open any page by clicking its title in the Categories list, on the left side of the dialog.
Configure the options you want to change using one or both of these methods:
Directly in the options pages.
Importing an options .ini
file that you
exported previously (see Importing and Exporting options
for details).
When you have set all your options, click
to save them and dismiss the dialog.This topic describes the options in detail. There is a section for each page in the Options dialog.
If you change options frequently for different compare or merge scenarios, or if you want to share your settings with other WinMerge users, consider saving your settings by exporting them to an options file. Then, whenever you want to use those settings, you can simply import the options file instead of setting options manually.
When you have set your options the way you want them, click
ini
is automatically appended), and click
.
In the generated text ini
file, each line
contains a name-value pair that defines a single option.
When you want to reuse your saved options, click
ini
file and click
.
The values in your imported options file replace all existing settings.
The General page has these options:
Disabled
(default): Compare window opens to the
top of the folder or file, with no difference selected.
Enabled
: When it first opens, the Compare
window selects the first difference, scrolling to the location if
necessary.
For a folder compare, selects the first different file or folders.
For a file compare, selects the first difference block in the files.
Disabled
(default): A splash screen is
displayed when you start WinMerge. You can dismiss the screen at any
time by clicking it; otherwise it is automatically dismissed after a
few seconds.
Enabled
: Completely omits the splash screen
when you start WinMerge. Note that this does not make startup
faster.
Enabled
(default): Lets you use the
ESC key to close WinMerge windows. Pressing
ESC once closes one window, so with one File Compare
window open, it takes three key presses to close WinMerge: first the
File Compare window, then the Folder Compare window, and finally the
WinMerge window.
Note that in the WinMerge command line, the
-e
parameter enables you to close WinMerge by
pressing ESC just once.
Disabled
: Pressing ESC does
not close any WinMerge windows.
Enabled
(default): The Select Files or Folders
dialog checks both paths as you enter them. The
button remains disabled until both paths are
validated. Note that this checking can cause some delay.
Disabled
: The button
in the Select Files or Folders dialog is always enabled, and attempts
to open any paths you specify. Since there is no delay during
validation, this can speed up the selection of paths. However, if the
path cannot be opened, an error dialog is displayed.
Disabled
(default): You can run multiple
WinMerge instances. For example, if WinMerge is currently running and
you click the WinMerge desktop shortcut, a new WinMerge window is
opened.
Enabled
: Limits the WinMerge program to one
instance:
If WinMerge is currently running and you try to start a new instance, no new application window is opened: the current WinMerge window is used instead.
If you start a new instance with paths (for example on the command line), a new Compare window is opened in the existing WinMerge window.
Also see the related options under Enable multiple compare windows for.
Disabled
(default): If you exit WinMerge while
multiple Compare windows are open, WinMerge prompts you to confirm
whether to close all the windows.
Enabled
: If you click
and there are no pending file changes,
WinMerge closes immediately.
Disabled
(default): If you save changes to a
file in WinMerge, the timestamp of the file is updated.
Enabled
: If you save changes to a file in
WinMerge, the timestamp of the file is not changed in your file
system.
Choose one of these options:
Disabled (default): No autocompletion is performed when you enter paths in the Select Files or Folders dialog.
From file system: Checks paths as you type. It attempts to locate paths in the file system that match the letters you type, and if a matching path is found, completes the path.
From MRU list: Checks paths only from the most recently used (MRU) list. This is handy when you have a limited set of paths to compare.
Controls whether WinMerge allows you to open single or multiple Compare windows. Specify the Folder compare and File compare options independently:
Disabled
(default): You can only open one
Folder compare or File compare window at a time.
Enabled
: You can open multiple Folder or File
compare windows simultaneously.
Note | |
---|---|
File Compare windows are children of Folder Compare windows. Therefore, you can open one File Compare window for every Folder Compare window, even if the File compare option is disabled. |
WinMerge allows you to suppress some common message boxes. For example, when two identical files are opened, the message box titled, The files are identical, is normally opened. If you don't want this box to display any more, you can enable (check) the option in that message box to not show the message again.
Later, you might decide that you want to see those messages again. If so, click the
button to make the message boxes display again.Note | |
---|---|
We recommend that you not suppress messages when updating WinMerge to a newer version. The installer enables their display automatically, but if you don't use the installer, then remember to enable message display by using the button. |
The options in this page enable you to change some of the ways that WinMerge detects differences, such as comparing only file size, or ignoring some types of differences, like case.
Important | |
---|---|
Customizing difference detection can be useful during comparisons, when you might not be interested in some differences. However, these options also affect merging. For example, if you ignore whitespace changes, then indentation changes in source code files are not preserved when you merge. For this reason, before you merge any differences, we strongly recommend resetting the options on this page to their default settings, especially the ignore options. To reset all the options on this page, click the button. |
A number of options in the Compare page (described later in this section) enable you to ignore certain differences. Ignored differences are treated in special ways in WinMerge:
They are marked with the Ignored Difference color.
Ignored differences cannot be merged
Ignored differences are not included in difference counts
Files containing only ignored differences are marked as identical in a folder comparison
Whitespace, the space between words and lines, is represented in text files by special, nonprinting characters like spaces, tabs, and linefeeds. The significance of whitespace varies a lot: spaces between words are usually important; in some text documents, indents and linefeeds are critical to meaning and readability; in structured code, linefeeds and tabs might be significant.
These whitespace options are available:
Default: All whitespace is compared. If you are not sure which option your document requires, this is the safest choice. In the example below, all lines are detected as different.
Example 1. Ignore whitespace change
One space between words:
Two Words
Two spaces between words:
Two Words
Tab between words:
Two Words
No spaces between words:
TwoWords
Compares differences in whitespace. In the preceding example, the first three lines have different whitespace, but are detected as identical: tabs and multiple are treated as if they are single space. The last line has no whitespace, so the difference is not ignored (in effect, the words in the last two lines are different):
Ignores all whitespace characters, except linefeeds (so lines are detected, and preserved in a merge). All lines in the preceding example are detected as identical.
Disabled
(default): Empty lines in the source
files are detected and represented in the File Compare window as blank
lines with the Deleted Difference colors.
Enabled
: Empty lines in the source files are
ignored. They are represented in the File Compare window as blank
lines with the Ignored Difference colors. However the difference
cannot be merged.
Disabled
(default): Comparisons are
case-sensitive. For example, LowerCase
,
LOWERCASE
, and lowercase
are all
different.
Enabled
: Differences between lowercase and
uppercase letters are ignored.
Disabled
(default): WinMerge detects end of
line (EOL) style differences. For example, if you compare two lines
that have the same contents but different line endings, the lines are
considered to be different. When this happens, WinMerge displays a
dialog prompting you to confirm whether to detect or ignore the
difference.
Enabled
: EOL differences are ignored.
Disabled
(default): WinMerge does not detect
when differences are due to moved lines.
Enabled
: WinMerge tries to detect lines that
are moved (in different locations in each file). Moved blocks are
indicated by the Moved and Selected
Moved difference colors. If the Location bar is displayed,
corresponding difference locations in the left and right location bars
are connected with a line. Showing moved blocks can make it easier to
visualize changes in files, if there are not too many.
For an example, see the Location pane description in Comparing and merging files.
Disabled
(default): Files with different
timestamps are detected as different.
Enabled
: Sometimes (for example, when you use
network shares) small differences in timestamps are not significant.
To get more meaningful results in such situations, this option enables
you to ignore time differences smaller than three seconds.
This option works only with the File Compare method). It has no effect with other methods.
and compare methods (described inWarning | |
---|---|
This option should be enabled only when the time difference is detected. Otherwise, it can cause incorrect compare results. |
This option lets you determine how complete your file comparisons are. Choose one of these five choices:
Default: Full comparison of files by content, with all the bells and whistles. This method invokes plugins and uses the diffutils engine for fully accurate differencing and moved block detection. This is the most complete and recommended method.
Slimmed-down comparison of files by content. This method uses streamlined file comparison code which skips plugins and moved block detection. This method is faster than Full Contents, because it does not load the files.
Its drawback is that line filters are not applied when comparing. For example, this method sees file as different even if line filters are set to ignore all differences in the files.
Compares only the modification dates on the files, so it is far faster than either of the contents methods. But obviously, it is only as accurate as the modification dates.
Similar to Modified Date, but also checks file sizes when dates are identical.
Compares only file sizes, so it is fast but not as accurate as the contents methods.
This option is enabled only when the Quick Contents compare method is selected.
Disabled
(default): WinMerge examines all
differences in the files.
Enabled
: This option optimizes comparisons by
examining files only until the first difference is found, instead
always scanning the entire files.
The drawback is that WinMerge may be unable to identify binary files as binary. This is likely to happen if the first difference is near the beginning of the file. If you know what kind of files you are comparing (for example, which are binary files), this option can be a good way to speed up comparisons. However, don't enable this option if you are not sure what kind of files you are comparing.
Disabled
(default): WinMerge compares comments
in code, along with other content.
Enabled
: This option optimizes comparisons by
detecting comments in certain programming language file types (such as
C++ and Java), and ignoring them.
The recognized file types and their comment markers are defined
in the file, IgnoreSectionMarkers.ini
, at the top
of the WinMerge installation directory.
Enabled
(default): WinMerge can syntax
highlight many programming language and web formats. To see the
formats that are supported by default, click → .
Disabled
: Syntax highlighting consumes some
processing power, so if WinMerge screen updating seems to be slow,
turning off this option might help.
Disabled
(default): WinMerge rescans
automatically when you merge a difference, or if you manually rescan
(for example, click the button).
Enabled
: Forces WinMerge to rescan after every
edit event (a change to files, like typing).
Note | |
---|---|
To avoid slowing down your editing, WinMerge delays automatic rescanning a little: it waits one second after each edit event. Because each new edit event resets the timer, no rescans occur until you pause or stop editing. |
Disabled
(default): Assumes that files are
meant to be Windows files. If a file does not use the standard Windows
line ending, WinMerge considers this to be an error. It silently
changes the line endings to the Windows style instead of detecting
them as differences. Thus, the File Compare window status bar shows
the EOL style as Win.
For most situations, you should leave this option disabled: this default behavior works even when comparing two files that have different line ending styles.
Enabled
: Prevents WinMerge from automatically
changing line endings, so that it detects different EOL styles for
every line. This might be useful for handling files from systems with
different EOL styles (for example, Windows and Unix).
Important | |
---|---|
This is an advanced option for users who are familiar with EOL bytes and who want to compare files with different EOL styles inside one file. We recommend that you not enable this option unless you need this advanced functionality. Remember, this option is not required to compare two files with different EOL styles. |
Width of a tab space. Specify a value
n
: the resulting width is equivalent to
that of n
characters. Default: 4. The
maximum value is 64.
Determines what kind of character is used when you insert a tab in text. Only one of these options can be enabled:
Insert Tabs (default): Uses a single tab character.
Insert Spaces: Uses one or more
spaces (determined by the Tab size
) instead of
a tab character. For example, with the default tab size, four
spaces are inserted.
WinMerge can highlight not only different lines, but also differences within lines. You can enable and disable line difference coloring using either the View Line Differences option in this page, or by clicking → . For example, when the menu item is checked, the option in this page is also checked, and changing either setting automatically changes the other.
However, View Line Differences and the options under it give you control over exactly what kinds of differences are detected within lines:
Enabled
(default): WinMerge highlights
differences within lines (also enables the → menu item).
When this option is enabled, you can choose one of these suboptions. The best choice usually depends on the file types you are comparing:
Character level: Detects individual characters that are different. This option can be useful for file formats that do not have clear word breaks, or if you are looking for single-character differences. For example, this level makes it easy to spot a single changed character in the middle of a word.
Word-level (default): Detects words that are different. Possible advantage: making it easy to copy and paste words.
Break at whitespace (default): Words are assumed to be separated by whitespace characters. This usually works for typical text files.
For example, these two lines contain punctuation but no whitespace. So, with the Break at whitespace option, WinMerge detects no word breaks. Instead, it highlights the text as a single word-level line difference.
10,20,30,40,50
10,25,30,45,50
Break at whitespace or punctuation: Considers both whitespace and punctuation characters to be word breaks. This is useful for handling lists that are separated with punctuation (like comma-separated lists). In the preceding example, WinMerge highlights only 20 and 40 in the first line, and 25 and 45 in the second line.
Disabled
: WinMerge does not highlight
differences within lines, and all settings for the level and
whitespace options are ignored (also disables the → menu item).
Use this page if you want to change any of the difference colors used in the File Compare window. You can set the background, deleted, and text color.
To change a color, click in its box to open a standard Color chooser dialog. Choose one of the predefined colors or define your own custom color, then click
to load the new color in the box.At any time, you can click
to reload the installed color scheme.Use this page to change the colors used for text. First, check the option, Use customized text colors. This activates the text options. There is an option for three kinds of text: whitespace, regular text, and selected text. For each kind of text , you can choose a color for the background and the text.
By default, the WinMerge File Compare window marks the syntax of certain kinds of source code, as described in Syntax highlighting. This page lists the syntax elements that are recognized, and enables you to change their text color and weight.
At any time, you can click
to reload the installed color scheme.This page contains options for configuring Winzip archive support using 7-Zip.
If WinZip is already installed on your system, WinMerge automatically detects it, and you don't need to configure anything here. Otherwise, you can click this link to open the WinMerge downloads page in your Web browser. There, you can download the 7-Zip Plugin installer (and other WinMerge files). To install the plugin, see 7-Zip and archive support. Remember to close WinMerge before running the 7-Zip installer.
This option controls how WinMerge handles archive files (based on 7-Zip integration).
Enabled
(default): WinMerge recognizes 7-Zip
archives.
WinMerge can access 7-Zip from two installation sources. If you specified one of these methods earlier (for example, during the WinMerge installation), you can change it here:
Use stand-alone 7-Zip if available
Use local 7-Zip from WinMerge folder
Disabled
: Turns off 7-Zip archive
integration.
Disabled
(default): WinMerge recognizes only
archives whose file extension is known on your system (for example, in
the registry or through a file association).
Enabled
: WinMerge can recognize archive files
even if their file extension is not known. To recognize an archive,
WinMerge searches the beginning of the file for the archive signature
bytes.
Tip | |
---|---|
You can use this option to enable WinMerge to recognize Open Office files. |
Enabled
(default): Files and folders that you
delete in a Folder Compare window are moved to the Recycle Bin, if it
is available.
Important | |
---|---|
Remember: if the Recycle Bin on your system has been deactivated, this option does not work, and deleted files are lost! |
Disabled
: Files and folders deleted in a
directory compare actually deleted.
Enabled
(default): Adds one or more WinMerge
shortcuts to the Windows Explorer context menu. After right-clicking
one or more files or folders, choose a WinMerge shortcut to open the
items in a WinMerge compare window.
Two additional options are available if you use this integration. Neither option is enabled by default, but you can enable one or both:
Disabled
(default): The
shortcut is included in
the Windows Explorer context menu when you right-click one
or more files or folders. If you select a single item, the
Select Files or Folders dialog opens. If you select two
items, they are opened directly in a Compare window.
Enabled
: Replaces the
shortcut in the Explorer
context menu with
shortcuts, described in Shell integration. The
shortcuts enable you to
add a selected path to memory, then choose the second
separately (for example, in a different Explorer
view).
Disabled
(default): When you use the
or
shortcut, only the top
level of files is selected: the compare operation is
non-recursive.
Enabled
: The selection includes
subfolders, making the compare operation recursive.
Another way to include subfolders is to press Control while selecting the or shortcut in the Windows Explorer context menu.
Disabled
: The
shortcut is unavailable in Windows
Explorer.
The WinMerge File Compare window provides common editing functions. If you prefer using your favorite, full-featured editor, you can configure WinMerge to open an external editor from the Folder Compare context menu.
By default, Notepad is configured as the default external editor, because it is found on all Windows systems. To configure a different external editor, enter the full path to its executable file.
Tip | |
---|---|
Along with the path, you can include any command line parameters
supported by the external tool, in this format:
|
To use the configured external editor, right-click a file in the Folder Compare window and choose
→ or → .Use this field to specify your own private folder for file filters.
By default this folder is your user profile directory (for example,
My Documents
on Windows XP, or
Documents
on Windows Vista). When you create a file
filter, it is automatically added to this folder.
This page allows you to control how WinMerge creates backup files.
Specify when WinMerge should create backup files. You can enable or disable each of these options independently:
Folder compare (disabled by default): Backup files are create whenever files are overwritten (copied).
File compare (enabled by default): Backup files are created whenever files are saved.
Specify where backup files are created. Only one of these options can be enabled:
Original file's folder (enabled by default): Backup files are created in the same folder as the source file. This is usually a good choice. The down side is that cleaning up backup files in big folders can take a lot of work.
Global backup folder (disabled by default): All backup files are created in one global folder. This makes them easy to clean up. But, if there are multiple source files with same file name, then the most recent backup file overwrites the previous one of the same name.
When WinMerge creates a backup file, it appends an extension to the source file name. You can choose either or both of these extension schemes:
Append .bak -extension (enabled by
default): For example, the file.txt
is backed up
to file.txt.bak
.
File compare (enabled by default): Timestamps are almost always unique, so this option usually avoids duplicating backup file names when the source files have the same names.
Also, storing a copy of a file each time you save it provides a way to track changes to the file. However, you should consider that this option can create a lot of files.
Use this page to configure or disable the WinMerge integration with a supported versioning system.
Choose one of these options:
None (default)
Visual SourceSafe (less than 5.0)
Also enter the path to SS.EXE
.
Visual SourceSafe (5.0 and above)
Rational ClearCase
Also enter the path to cleartool.exe
.
This page allows you to specify the codepage that the ANSI version of WinMerge uses for ANSI files. , and whether the codepage of certain file formats should be detected from the contents of the files.
Important | |
---|---|
The ANSI version of WinMerge ( |
Note | |
---|---|
A full explanation of text encoding and Windows codepages is beyond the scope of WinMerge documentation. Fortunately, there is lots of information about them on the Internet. For example, here are some places to start: |
Choose one of these radio buttons to set the default codepage that WinMerge uses when handling ANSI files:
System codepage (default):The codepage used by your Windows system. This default is usually the best choice. However if you know that you are comparing files that do not use the system codepage, consider one of the other options.
According to WinMerge User Interface: The encoding used by your installation of WinMerge.
Custom codepage: Enter the codepage number
explicitly. For example, UTF-8
or
ISO-8851-1
.
Important | |
---|---|
Uncheck this option in |
Disabled
(default): WinMerge does not read
codepage information from the source files. It uses the default
codepage setting instead.
Enabled
: WinMerge detects the codepage for
these extensions : html
,
rc
(resource files for VC++)
and xml
. The detected codepage
overrides the setting for the default codepage option.
This option is of interest when your documents use a codepage that is different from the codepage of your Windows configuration.
For example, you might merge two Slovak or two Japanese files in an English environment. With this option enabled (and with the required fonts), your Slovak, or Japanese, the files are displayed using Slovak, or Japanese, characters.
WinMerge also detects a codepage difference between the left/right files. To avoid lossy conversions when you merge, copy, or paste, we suggest that you ignore the codepage information.
Caution | |
---|---|
When you copy or paste text to an external application, the external application must use the same codepage as WinMerge does. Refer to the documentation for your external editor. For copying to WinMerge, Internet Explorer offers codepage selection. If your external editor does not support custom codepages, disable this option. |